5. Logging
For every haynes api request create a document inside a firebase collection of respective method name as expected below
Logs
|--> haynes
| |--> getCipher
| |--> getMachineToken
| |--> getMaintenanceSystemsV5
| |--> getRepairRenewalNodes
| |--> getRepairTimeTypes
| |--> getRepairtimeNodesV3
Post firebase document creation implement the following steps
- store the time in milliseconds
- await for the api call establishment.
- log the request payload being sent
- await for the network call to finish
- log the response data received
- log the error in case of failure
- on receiving successful response or failure error, assess the call time by
- fetch current time
- read time at api call initialization
- calculate the time difference
- update the log document to include api call time
Status: Accepted
Category: Protected
Authored By: Vishwa on Mar 22, 2023